<?php if ($comingup):?>

	<?php $first = false; $currdate = ''; foreach($comingup as $key => $activity):?>
		
		
	
		<li id="activity-<?=$activity->id;?>" class="<?php if ($first) echo 'first';?> <?php if ($activity->completion) echo 'complete';?> clearfix">
			
			<p><?php if ($activity->dateapplicable != $activity->startdate):?>
				<?php if ($activity->completion):?><a class="notcomplete">Set as Not Complete</a><?php else:?><a class="complete">Set as Complete</a><?php endif;?>
			<?php endif;?>
				
				<span class="<?php if ($activity->deadline) echo 'deadline'; else if ($activity->milestone) echo 'milestone'; else echo 'task';?>"><?php if ($activity->deadline) echo 'deadline'; else if ($activity->milestone) echo 'milestone'; else echo 'task';?></span>&nbsp;&nbsp;&nbsp;
				
			<?php if ($currdate != $activity->dateapplicable):?>
			<strong><?=date('l jS F' , strtotime($activity->dateapplicable));?></strong>
			<?php $first = true;$currdate = $activity->dateapplicable; endif;?>
				
				
			<div class="content">
				<h3><a href="<?=site_url('jobs/showUpdates/'.$activity->jobid);?>"><?=$activity->activity_title;?></a> <?php if ($activity->dateapplicable == $activity->enddate) echo '[end]'; else if ($activity->dateapplicable == $activity->startdate) echo '[start]';?> on <a href="<?=site_url('jobs/showUpdates/'.$activity->jobid);?>"><?=$activity->job_title;?></a> for <a href="<?=site_url('companies/view/'.$activity->companyid);?>"><?=$activity->company_name;?></a></h3>
				<?php if(strlen(trim($activity->activity_notes))) : ?><p><?=nl2br($activity->activity_notes);?></p><?php endif; ?>
				
			</div>
		</li>
	
	<?php $first = false;endforeach;?>

<?php endif;?>